﻿using Abp.Domain.Entities.Auditing;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyCompanyName.AbpZeroTemplate.Gantt
{
    public partial class Calendar : General
    {
        public Calendar()
        {
            this.CalendarDays = new HashSet<CalendarDay>();
            this.ChildrenRaw = new HashSet<Calendar>();
            this.Resources = new HashSet<Resource>();
            this.Tasks = new HashSet<TaskInfo>();
            this.CreateOn = DateTime.Now;
        }
        public int ProjectId { get; set; }
        public System.DateTime CreateOn { get; set; }
        public string CreateBy { get; set; }
        public virtual Nullable<int> parentIdRaw { get; set; }
        public string Name { get; set; }
        public Nullable<int> DaysPerMonth { get; set; }
        public Nullable<int> DaysPerWeek { get; set; }
        public Nullable<int> HoursPerDay { get; set; }
        public Nullable<byte> WeekendsAreWorkdaysRaw { get; set; }
        public Nullable<int> WeekendFirstDay { get; set; }
        public Nullable<int> WeekendSecondDay { get; set; }
        public string DefaultAvailabilityRaw { get; set; }

        public virtual ICollection<CalendarDay> CalendarDays { get; set; }

        [ForeignKey("parentIdRaw")]
        public virtual ICollection<Calendar> ChildrenRaw { get; set; }
        [ForeignKey("Id")]
        public virtual Calendar Parent { get; set; }
        public virtual ICollection<Resource> Resources { get; set; }
        public virtual ICollection<TaskInfo> Tasks { get; set; }
    }
}
